package cn.weiyang.biz;

import cn.weiyang.dao.StreetDao;
import cn.weiyang.entity.Street;
import cn.weiyang.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * Created by Administrator on 2017/7/10.
 */
public class StreetBizImpl implements StreetBiz{
    /**
     * 查询所有街道/根据区县号查找街道
     * @return
     */
    public List<Street> queryStreet(Integer did) {
        SqlSession session=SqlSessionFactoryUtil.getSqlSession();
        StreetDao sd=session.getMapper(StreetDao.class);
        List<Street> streets=sd.queryStreet(did);
        session.close();
        return streets;
    }
}
